.material-selector-container {
  width: 280px;
  height: 100vh;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  overflow-y: auto;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.search-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #8c8c8c;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.search-button:hover {
  background-color: #f5f5f5;
  color: #1890ff;
}

.material-tabs {
  display: flex;
  border-radius: 8px;
  background-color: #f5f5f5;
  padding: 4px;
  margin-bottom: 20px;
}

.tab-button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: #595959;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
}

.tab-button:hover {
  background-color: #e6f7ff;
  color: #1890ff;
}

.tab-button.active {
  background-color: #1890ff;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
}

.material-categories {
  padding-bottom: 20px;
}

.category {
  margin-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
}

.category:last-child {
  border-bottom: none;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 12px;
}

.category-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
}

.view-all-button {
  background: none;
  border: none;
  font-size: 13px;
  color: #8c8c8c;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.view-all-button:hover {
  color: #1890ff;
  background-color: #e6f7ff;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3列网格 */
  gap: 8px;
}

.material-card {
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.material-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.material-thumbnail {
  height: 80px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}

/* 简化了原有的背景样式，实际应用时可替换为实际图片 */
.party-flag {
  background-color: #ff4d4f;
}

.red-ribbon {
  background-color: #ff7875;
}

.red-boat {
  background-color: #ff9c6e;
}

.party-badge {
  background-color: #ffc53d;
}

.red-books {
  background-color: #ffd8bf;
}

.dumplings {
  background-color: #b7eb8f;
}

.porridge {
  background-color: #d9f7be;
}

.nuts {
  background-color: #ffc53d;
}

.fruit-platter {
  background-color: #ff85c0;
}

.single-flower {
  background-color: #36cfc9;
}

.flower-bouquet {
  background-color: #5cdbd3;
}

.hydrangea {
  background-color: #69c0ff;
}

.material-tags {
  display: flex;
  padding: 5px;
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
}

.tag {
  background-color: rgba(255, 255, 255, 0.8);
  color: #333;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.material-name {
  padding: 8px;
  font-size: 12px;
  color: #333;
  background-color: white;
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #8c8c8c;
}

.no-results button {
  display: block;
  margin: 15px auto 0;
  padding: 8px 20px;
  background-color: #1890ff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.no-results button:hover {
  background-color: #40a9ff;
}

/* 滚动条样式 */
.material-selector-container::-webkit-scrollbar {
  width: 6px;
}

.material-selector-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.material-selector-container::-webkit-scrollbar-thumb {
  background: #bae7ff;
  border-radius: 4px;
}

.material-selector-container::-webkit-scrollbar-thumb:hover {
  background: #69c0ff;
}